-- GENERATED SPELL FOR [Crimson Templar] --


function spell0_15209(pUnit, Event) --@Elemental Spawn-in,Self--
pUnit:FullCastSpellOnTarget(25035,pUnit)
pUnit:RegisterEvent('Sorts_15209', 686, 1)
end

function spell1_15209(pUnit, Event) --@Fireball Volley,n/a--
pUnit:FullCastSpellOnTarget(11989,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15209', 549, 1)
end

function spell2_15209(pUnit, Event) --@Flame Buffet,n/a--
pUnit:FullCastSpellOnTarget(16536,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15209', 45280, 1)
end

function Sorts_15209(pUnit, Event)
local choix_sorts_15209 = math.random(0, 2)
if choix_sorts_15209 == 0 then
pUnit:RegisterEvent('spell0_15209', 1, 1)
end
if choix_sorts_15209 == 1 then
pUnit:RegisterEvent('spell1_15209', 1, 1)
end
if choix_sorts_15209 == 2 then
pUnit:RegisterEvent('spell2_15209', 1, 1)
end
end

function mob15209_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15209', math.random(1500, 3000), 1)
end

function mob15209_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15209_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15209_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15209, 1, 'mob15209_Action')
RegisterUnitEvent(15209, 2, 'mob15209_Leave')
RegisterUnitEvent(15209, 3, 'mob15209_Kill')
RegisterUnitEvent(15209, 4, 'mob15209_Die')
